const { defineConfig } = require('@vue/cli-service')

module.exports = defineConfig({
  productionSourceMap: false,
  transpileDependencies: true,
  css: {
    loaderOptions: {
      less: {
        modifyVars: {
          hack: `true; @import "~@/assets/styles/global.less";`,
        }
      }
    }
  },
  devServer: {
    proxy: {
      '/api': {
        target: 'http://fa.jiankangqidixiehui.com',
        pathRewrite: { '^/api': '' },
        ws: true,
        changeOrigin: true
      },
      '/assets': {
        target: 'http://fa.jiankangqidixiehui.com',
        changeOrigin: true
      },
      '/uploads': {
        target: 'http://fa.jiankangqidixiehui.com',
        changeOrigin: true
      },
    }
  }
})
